package com.litq.education.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.litq.education.bean.VipTable;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * vipMapper
 *
 * @author litq
 * @version v1.0
 * @since 2019/2/10 1:31
 */

@Mapper
public interface VipMapper extends BaseMapper<VipTable> {
    /**
     * @param page 页码
     * @param id
     * @Method 页面查询客户所有信息
     * @Author Litq
     * @Version 1.0
     * @Description 查询客户所有信息
     * @since 2019/8/16
     */
    @Select("SELECT * FROM `vip_table` ")
    List<Map<String, Object>> dyGetUserList(Page<Map<String, Object>> page, Integer id);

    /**
     * @Method 查询数据总条数
     * @Author Litq
     * @Version 1.0
     * @Description 查询数据总条数
     * @since 2019/8/16
     */
    @Select("select count(*) from `vip_table` ")
    int count();



    /**
     * @param username 姓名
     * @Method 页面查询客户所有信息
     * @Author Litq
     * @Version 1.0
     * @Description 查询客户所有信息
     * @since 2019/8/16
     */
    @Select("SELECT * FROM `vip_table` where vip_name = #{username}")
    List<Map<String, Object>> dyGetUserListByUsername(String username);

}
